package org.tio.sitexxx.service.service.qj;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.SqlPara;
import org.tio.sitexxx.service.model.main.Commodity;
import org.tio.sitexxx.service.vo.Const;

import java.util.List;
import java.util.Map;

public class CommodityService {
    public static final CommodityService me = new CommodityService();
    final Commodity dao = new Commodity().dao();

    public List<Commodity> getCommoditys(Map<String,Object> kv) {
        SqlPara sqlPara = Db.use(Const.Db.TIO_SITE_MAIN).getSqlPara("commodity.getCommoditys", kv);
        List<Commodity> commodities = dao.find(sqlPara);
        return commodities;
    }
}
